﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--DXMETADATA start type="MetaCharset" --><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><!--DXMETADATA end-->
    <meta http-equiv="X-UA-Compatible" value="IE=9" />

    <!--DXMETADATA start type="Literal" condition="helpversion:value=3" value="<meta name=""Microsoft.Help.SelfBranded"" content=""true"" />" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="ItemTitle" format="<title>%%ProjectTitle%% - %%ItemTitle%%</title>" --><title>SpreadJS Documentation - Outline Columns</title><!--DXMETADATA end-->
    <!--DXMETADATA start type="ItemTitle" format="<meta name=""Title"" content=""%%ProjectTitle%% - %%ItemTitleNoQuotes%%""/>" --><meta name="Title" content="SpreadJS Documentation - Outline Columns"/><!--DXMETADATA end-->
    
    <!--DXMETADATA start type="PackageLink" packagename="jquery" filetype="script" firstlinkattributes="id=""mshs_support_script"""--><script src="template/packages/jquery/script/default/jquery-1.11.3.min.js" type="text/javascript" id="mshs_support_script"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="jquery-ui" filetype="script"--><script src="template/packages/jquery-ui/script/default/jquery-ui-1.11.4.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="jquery-ui" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/jquery-ui/css/default/jquery-ui-1.11.4.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="TemplateSettingsJson" format="<script type=""text/javascript"">var Innovasys=(Innovasys||{});$.extend(true,Innovasys,{settings:{isHideBodyDuringLoadDisabled:true,dynamictoc:{isEnabled:true},inthistopic:{isSupported:true},dynamicstyles:{isDynamicWordWrapEnabled:true}}},{settings:%%TemplateSettingsJson%%});</script>" --><script type="text/javascript">var Innovasys=(Innovasys||{});$.extend(true,Innovasys,{settings:{isHideBodyDuringLoadDisabled:true,dynamictoc:{isEnabled:true},inthistopic:{isSupported:true},dynamicstyles:{isDynamicWordWrapEnabled:true}}},{settings:{"dynamictoc":{"initialNodeId":"n201","initialNodeContainer":"c0","isResizable":true},"inthistopic":{"isEnabled":true},"currentLocale":"-","isFrameless":true,"navigationKind":"inpage","versions":{"locale":{"currentId":"-"}}}});</script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="light" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/light/css/dynamic-toc.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="Synopsis" StripHtmlTags="True" MaxLength="250" format="<meta name=""Description"" content=""%%Synopsis%%"" />"--><meta name="Description" content="Outline columns in SpreadJS refers to indenting text in the columns to create a tree-like structure in a spreadsheet for better organization of data." /><!--DXMETADATA end-->
    
    <!--DXMETADATA start type="PackageLink" packagename="plugins-topics" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/plugins-topics/css/default/jquery-plugins.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="core-topics" filetype="css" firstlinkattributes=" data-mshv2-stylesheet=""/template/packages/core-topics/topics.mshv2.css"" data-mshv1-stylesheet=""/template/packages/core-topics/topics.mshv1.css"" data-responsive-mobile=""template/packages/core-topics/topics.mobile.css"" data-responsive-tablet=""template/packages/core-topics/topics.tablet.css"""--><link rel="stylesheet" type="text/css" href="template/packages/core-topics/css/topics.css"  data-mshv2-stylesheet="/template/packages/core-topics/topics.mshv2.css" data-mshv1-stylesheet="/template/packages/core-topics/topics.mshv1.css" data-responsive-mobile="template/packages/core-topics/topics.mobile.css" data-responsive-tablet="template/packages/core-topics/topics.tablet.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="plugins-topics" filetype="script"--><script src="template/packages/plugins-topics/script/default/jquery-plugins.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="core-topics" filetype="script"--><script src="template/packages/core-topics/script/topics.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    
    <!--DXMETADATA start type="TopicId" format="<meta name=""Microsoft.Help.Id"" content=""%%TopicId%%""/>" --><meta name="Microsoft.Help.Id" content="3804f20d-f347-4743-8e05-41886794f23d"/><!--DXMETADATA end-->
    <!--DXMETADATA start type="TocParentId" format="<meta name=""Microsoft.Help.TocParent"" content=""%%TocParentId%%""/>" --><meta name="Microsoft.Help.TocParent" content="3ff39078-fb0f-471b-a3ec-25d37e40d683"/><!--DXMETADATA end-->
    <!--DXMETADATA start type="TocOrdinal" format="<meta name=""Microsoft.Help.TocOrder"" content=""%%TocOrdinal%%""/>" --><meta name="Microsoft.Help.TocOrder" content="24"/><!--DXMETADATA end-->
    <meta name="Microsoft.Help.F1" content=""/>
    <meta name="Microsoft.Help.ContentType" content="Concepts" />
    <!--DXMETADATA start type="MshvKeywords" condition="helpversion:value=3" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="MshvMetaTags" condition="helpversion:value=3" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="Help3CatalogLocale" condition="helpversion:value=3" format="<meta name=""Microsoft.Help.Locale"" content=""%%Help3CatalogLocale%%"" />"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Help3CatalogLocale" condition="helpversion:value=3" format="<meta name=""Microsoft.Help.TopicLocale"" content=""%%Help3CatalogLocale%%"" />"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Stylesheets" --><link rel="stylesheet" type="text/css" href="stylesheets/hs-simpletab.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="StylePropertyValues" format="<style>%%StylePropertyValues%%</style>" --><style>.i-is-new .i-page-title-text::after, ul#i-dt-root li.i-is-new>a::after { content: "New" }
</style><!--DXMETADATA end-->
    <!--DXMETADATA start type="Scripts" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="DesignTime"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Scrap" condition="communityenabled" name="_COMMUNITY_PROPERTIES" --><!--DXMETADATA end -->
    <!--DXMETADATA start type="CustomHeadContent" --><link rel="stylesheet" type="text/css" href="template/packages/core-web/css/SP.css">
<script type="text/javascript">
var currentHeader = function() {
    return "spjs";
}
</script>
<script src="template/packages/core-web/script/topNavigation.js"></script>
<script async="" src="https://www.googletagmanager.com/gtm.js?id=GTM-WT462SJ"></script>
<script>
        (function (w, d, s, l, i) {
            w[l] = w[l] || [];
            w[l].push({
                'gtm.start': new Date().getTime()
                , event: 'gtm.js'
            });
            var f = d.getElementsByTagName(s)[0]
                , j = d.createElement(s)
                , dl = l != 'dataLayer' ? '&l=' + l : '';
            j.async = true;
            j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
            f.parentNode.insertBefore(j, f);
        })(window, document, 'script', 'dataLayer', 'GTM-WT462SJ');
    </script>
<!--DXMETADATA end-->
</head>

<body>
    <div id="i-before-header-content" class="i-before-header-content">
        
    </div>

    <div id="i-header-container">
        <div id="i-header-content" class="i-header-content i-content-width-container">
            <!--DXMETADATA start type="LogoImage" --><!--DXMETADATA end-->
            <div class="i-project-title"><!--DXMETADATA start type="ProjectTitle" -->SpreadJS Documentation<!--DXMETADATA end--></div>
            <div class="i-search-container">
                <!--DXMETADATA start type="outputfileextension" format="<form action=""websearch%%outputfileextension%%"">" --><form action="websearch.html"><!--DXMETADATA end-->
                <input id="i-search" name="query"/>
                <input type="submit" id="i-search-button" value=""/>
                <!--DXMETADATA start type="Literal" value="</form>" --></form><!--DXMETADATA end-->
            </div>
            <!--DXMETADATA start type="outputfileextension" format="<a id=""i-index-button"" href=""webindex%%outputfileextension%%""></a>" --><a id="i-index-button" href="webindex.html"></a><!--DXMETADATA end-->
        </div>
    </div>
    
    <div class="i-content-width-container"><div class="i-busy-overlay"></div></div>

    <div id="i-breadcrumbs-outer-container" class="i-content-width-container"><!--DXMETADATA start type="Breadcrumbs" scrap="_BREADCRUMBS" --><div class="i-breadcrumbs-container">
<a href="overview.html">SpreadJS Documentation</a>
 / <a href="devguide.html">Developer's Guide</a>
 / <a href="features.html">Features</a>
 / <a href="interface.html">Manage User Interface</a>
 / Outline Columns</div><!--DXMETADATA end --></div>

    

    <div id="i-actions-outer-container" class="i-content-width-container">
        <div id="i-actions-container">
            <div id="i-actions-content" class="i-fixed-to-top">
                <!-- Spacing --> <span class="i-toggle-all-sections i-function-link">
                <label class="i-collapse-all"><!--DXMETADATA start type="Phrase" name="COLLAPSE_ALL" -->Collapse All<!--DXMETADATA end--></label>
                <label class="i-expand-all" style="display: none;"><!--DXMETADATA start type="Phrase" name="EXPAND_ALL" -->Expand All<!--DXMETADATA end--></label>
            </span><!--DXMETADATA start type="Literal" condition="communityenabled" value="%%scrap:name=_COMMUNITY_DROPDOWN%%" --><!--DXMETADATA end -->
                <div class="i-in-this-topic-container">
                    <span class="i-action-group-heading"><!--DXMETADATA start type="Phrase" Name="IN_THIS_TOPIC" -->In This Topic<!--DXMETADATA end--></span>
                </div>
            </div>
        </div>
    </div>

    <div id="i-toc-outer-container" class="i-content-width-container">
        <div id="i-toc-container">
            <div id="i-toc-content" class="i-fixed-to-top">
                <div class="i-toc-content-scroll-container">
                    <div id="i-dynamic-toc-container"><ul id="i-dt-root"></ul></div>
                </div>
            </div>
        </div>
    </div>

    <div id="i-body-content-container" class="i-content-width-container">
        <div id="i-body-content" class="i-body-content">
            <div class="i-page-title"><div class="i-page-title-text"><!--DXMETADATA start type="ItemTitle" -->Outline Columns<!--DXMETADATA end--></div></div>
            <div class="i-in-this-topic-container">
                <span class="i-action-group-heading"><!--DXMETADATA start type="Phrase" Name="IN_THIS_TOPIC" -->In This Topic<!--DXMETADATA end--></span>
            </div>
            <!--DXMETADATA start type="TopicSection" name="BodyText"--><p>Outline columns in SpreadJS refers to indenting text in the columns to create a tree-like structure in a spreadsheet for better organization of data.</p>

<p>This feature is useful particularly when you want to add hierarchial relationships between rows and built-in expand and collapse user interface in a spreadsheet. Also, outlining columns can be of great help when you need to create&nbsp;project plan tasks and project plan sub-task hierarchy, financial statements and bills of material documents while working with large amounts of data lying&nbsp;in spreadsheets.</p>

<p>Users can outline columns in a worksheet while&nbsp;also adding check boxes and images along with collapse and expand icons.</p>

<p>The following image displays an outline column with collapse and expand icons, check boxes, images, and row outlines.</p>

<p>&nbsp;</p>

<p><img border="0" alt="" src="images/indentcolumn.png" /></p>

<p>&nbsp;</p>

<p>You can implement the collapse and expand icons in your worksheet by using the&nbsp;<a href="SpreadJS~GC.Spread.Sheets.Worksheet~showRowOutline.html" data-auto-update-caption="true">showRowOutline method</a>. The levels in the tree structure correspond to the number of indentations.</p>

<p>You can also&nbsp;customize the images by level, show custom indicator, show checkbox and set maxlevel using <strong><em>outlineColumn.options</em></strong>.</p>

<h4>Using Code</h4>

<p>This example shows how to indent the columns and add images and check boxes.</p>

<div class="i-filtered-content-JavaScript" data-title="JavaScript" data-itemid="JavaScript">
    <table class="i-syntax-table">
        <tbody>
            <tr>
                <th>JavaScript</th>

                <th>
                    <div class="i-copy-code-wrapper">
                        <span class="i-copy-code">Copy Code</span>
                    </div>
                </th>
            </tr>

            <tr>
                <td class="i-code" colspan="2">var rowCount = 38;<br />
                var colCount = 10;<br />
                activeSheet.setColumnCount(colCount);<br />
                activeSheet.setRowCount(rowCount);<br />
                activeSheet.setColumnWidth(0, 310);<br />
                activeSheet.setColumnWidth(1, 150);<br />
                activeSheet.setColumnWidth(2, 150);<br />
                activeSheet.frozenColumnCount(1);<br />
                activeSheet.setValue(0, 0, "Name", GC.Spread.Sheets.SheetArea.colHeader);<br />
                activeSheet.setValue(0, 1, "Chapter", GC.Spread.Sheets.SheetArea.colHeader);<br />
                activeSheet.setValue(0, 2, "Page", GC.Spread.Sheets.SheetArea.colHeader);<br />
                var commands = [<br />
                &nbsp;&nbsp;&nbsp; {name: 'Preface', chapter: '1', page: 1, indent: 0},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Java SE5 and SE6', chapter: '1.1', page: 2, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Java SE6', chapter: '1.1.1', page: 2, indent: 2},<br />
                &nbsp;&nbsp;&nbsp; {name: 'The 4th edition', chapter: '1.2', page: 2, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Changes', chapter: '1.2.1', page: 3, indent: 2},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Note on the cover design', chapter: '1.3', page: 4, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Acknowledgements', chapter: '1.4', page: 4, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Introduction', chapter: '2', page: 9, indent: 0},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Prerequisites', chapter: '2.1', page: 9, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Learning Java', chapter: '2.2', page: 10, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Goals', chapter: '2.3', page: 10, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Teaching from this book', chapter: '2.4', page: 11, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'JDK HTML documentation', chapter: '2.5', page: 11, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Exercises', chapter: '2.6', page: 12, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Foundations for Java', chapter: '2.7', page: 12, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Source code', chapter: '2.8', page: 12, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Coding standards', chapter: '2.8.1', page: 14, indent: 2},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Errors', chapter: '2.9', page: 14, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Introduction to Objects', chapter: '3', page: 15, indent: 0},<br />
                &nbsp;&nbsp;&nbsp; {name: 'The progress of abstraction', chapter: '3.1', page: 15, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'An object has an interface', chapter: '3.2', page: 17, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'An object provides services', chapter: '3.3', page: 18, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'The hidden implementation', chapter: '3.4', page: 19, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Reusing the implementation', chapter: '3.5', page: 20, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Inheritance', chapter: '3.6', page: 21, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Is-a vs. is-like-a relationships', chapter: '3.6.1', page: 24, indent: 2},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Interchangeable objects with polymorphism', chapter: '3.7', page: 25, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'The singly rooted hierarchy', chapter: '3.8', page: 28, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Containers', chapter: '3.9', page: 28, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Parameterized types (Generics)', chapter: '3.10', page: 29, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Object creation &amp; lifetime', chapter: '3.11', page: 30, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Exception handling: dealing with errors', chapter: '3.12', page: 31, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Concurrent programming', chapter: '3.13', page: 32, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Java and the Internet', chapter: '3.14', page: 33, indent: 1},<br />
                &nbsp;&nbsp;&nbsp; {name: 'What is the Web?', chapter: '3.14.1', page: 33, indent: 2},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Client-side programming', chapter: '3.14.2', page: 34, indent: 2},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Server-side programming', chapter: '3.14.3', page: 38, indent: 2},<br />
                &nbsp;&nbsp;&nbsp; {name: 'Summary', chapter: '3.15', page: 38, indent: 1},<br />
                ];<br />
                for (var r = 0; r &lt; commands.length; r++) {<br />
                &nbsp;&nbsp;&nbsp; activeSheet.setValue(r, 0, commands[r]['name']);<br />
                &nbsp;&nbsp;&nbsp; activeSheet.setValue(r, 1, commands[r]['chapter']);<br />
                &nbsp;&nbsp;&nbsp; activeSheet.setValue(r, 2, commands[r]['page']);<br />
                &nbsp;&nbsp;&nbsp; activeSheet.getRange(r, 0, 1, 1).textIndent(commands[r].indent);<br />
                }<br />
                activeSheet.outlineColumn.options({<br />
                columnIndex: 0,<br />
                showImage: true,<br />
                showCheckBox: true,<br />
                images: ['star2.png', 'box4.png', 'rating4.png'],<br />
                maxLevel: 2<br />
                });<br />
                activeSheet.showRowOutline(true);<br />
                spread.invalidateLayout();<br />
                spread.repaint();</td>
            </tr>
        </tbody>
    </table>
</div>

<div class="i-box i-box-note">
    <p><strong>Note:</strong> This feature has the following limitations:</p>

    <ul>
        <li>The new row level is the same level as the selected row's previous row when you insert rows.</li>

        <li>The sortRange method recalculates indented text and refreshes indented columns.</li>

        <li>Drag fill and drag move only change the cell contents.</li>

        <li>Copy and paste only changes the cell content.</li>
    </ul>
</div><!--DXMETADATA end-->
            <a name="seealsobookmark"></a>
            <!--DXMETADATA start type="FilteredItemList" scrap="CATEGORISED_LINKS" namespace="linkcategory" source="Item" filter="" NoHeader="True" NoFooter="True" format="%%replaceinquotes:value=false%%%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=seealso,caption=""%%phrase:name=SeeAlso%%%%designlist:tagidentifier=seealso,itemtype=See Also%%""%%%%filtereditemlist%%</div>"--><!--DXMETADATA end-->
            
            <div id="i-footer-content" class="i-footer-content">
                <!--DXMETADATA start type="Scrap" condition="communityenabled" name="_COMMUNITY_FOOTER" --><!--DXMETADATA end -->
<!--DXMETADATA start type="Variable" name="CopyrightNotice" format="<p>&nbsp;</p><p>&nbsp;</p><hr style=""height: 1px"" /><p>%%variable%%</p>" --><p>&nbsp;</p><p>&nbsp;</p><hr style="height: 1px" /><p><p>Copyright © 2019 GrapeCity, Inc. All rights reserved.</p>
<p><a href="https://www.grapecity.com/en/forums/winforms-edition" target="_blank">Product Support Forum</a> | <a href="javascript:window.print()">Print this page</a></p>
<ul class="social">
<li><a href="https://www.facebook.com/GrapeCityUS/" target="_blank" class="facebook">&nbsp;</a></li>
<li><a href="https://twitter.com/GrapeCityUS" target="_blank" class="twitter">&nbsp;</a></li>
<li><a href="https://www.linkedin.com/company/grapecity" target="_blank" class="linkedin">&nbsp;</a></li>
</ul>
</p><!--DXMETADATA end -->
<!--DXMETADATA start type="Variable" name="FeedbackLink" format="" --><!--DXMETADATA end-->
            </div>
        </div>
    </div>
        
    <script type="text/javascript">
        $(function () {
            var documentInstance = new Innovasys.Content.Document(document.body);
            documentInstance.load();
        });
    </script>
</body>
</html>
